home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / AIncludes / Printing.a < prev    next >
Encoding:
Text File  |  1993-11-30  |  5.9 KB  |  147 lines  |  [TEXT/MPS ]

  1. ;    File:        Printing.a
  2. ;
  3. ;    Copyright:    © 1983-1993 by Apple Computer, Inc.
  4. ;                All rights reserved.
  5. ;
  6. ;    Version:    System 7.1 for ETO #11
  7. ;    Created:    Tuesday, March 30, 1993 18:00
  8. ;
  9. ;___________________________________________________________________________
  10.  
  11.     IF &TYPE('__INCLUDINGPRINTING__') = 'UNDEFINED' THEN
  12. __INCLUDINGPRINTING__    SET    1
  13.  
  14. ; No external refs required
  15.  
  16. ; Printing Code Contsants
  17.  
  18. ; These are the PrDrvr constants.
  19.  
  20. iPrDrvrID         EQU         2                         ; Driver's ResID
  21. iPrDrvrRef        EQU         $FFFD                     ; Driver's RefNum = NOT ResID
  22. iPrDrvrDev        EQU         $FD00                     ; Driver's QD Dev num = RefNum in Hi Byte, variant in lo
  23. iPrBitsCtl        EQU         4                         ; The Bitmap Print Proc's ctl number
  24. lScreenBits       EQU         $00000000                 ; The Bitmap Print Proc's Screen Bitmap param
  25. lPaintBits        EQU         $00000001                 ; The Bitmap Print Proc's Paint [sq pix] param
  26. iPrIOCtl          EQU         5                         ; The Raw Byte IO Proc's ctl number
  27. iPrEvtCtl         EQU         6                         ; The PrEvent Proc's ctl number
  28. lPrEvtAll         EQU         $0002FFFD                 ; The PrEvent Proc's CParam for the entire screen
  29. lPrEvtTop         EQU         $0001FFFD                 ; The PrEvent Proc's CParam for the top folder
  30. iPrDevCtl         EQU         7                         ; The PrDevCtl Proc's ctl number
  31. iPrReset          EQU         1                         ; The PrDevCtl Proc's CParam for reset
  32. iPrPageEnd        EQU         2                         ; The PrDevCtl Proc's CParam for end page
  33. iPrLineFeed       EQU         3                         ; The PrDevCtl Proc's CParam for paper advance
  34. iFMgrCtl          EQU         8                         ; The FMgr's Tail-hook ctl call
  35. iFMgrStat         EQU         8                         ; The FMgr's Pre-hook status call
  36.  
  37. ; Printing data structures
  38.  
  39. ; Print Info data structure TPrInfo
  40. ; The parameters needed for page composition.
  41.  
  42. iDev              EQU         0                         ; Font mgr/QuickDraw device code [integer]
  43. rPage             EQU         6                         ; printable area device coord. [rect]
  44.  
  45. ; Printer Style data structure
  46. ; The printer configuration and usage information.
  47.  
  48. iPageV            EQU         2                         ; V paper size in units of 1/iPrPgFract [word]
  49. iPageH            EQU         4                         ; H paper size. [word]
  50. feed              EQU         7                         ; paper feeder type [byte]
  51.  
  52. ; Print eXtra Info data structure
  53. ; The print time eXtra information.
  54.  
  55. iDevBytes         EQU         6                         ; Size for allocation. [word]
  56.  
  57.  
  58. ; Print Job data structure
  59. ; Print "form" for a single print request.
  60.  
  61. iFstPage          EQU         0                         ; Page Range [word]
  62. iLstPage          EQU         2                         ; [word]
  63. iCopies           EQU         4                         ; # copies [word]
  64. bJDocLoop         EQU         6                         ; Draft quality print flag [byte]
  65. fFromApp          EQU         7                         ; Printing from an App (not PrApp) flag [byte]
  66. pIdleProc         EQU         8                         ; Idle Proc [pointer]
  67. pFileName         EQU         12                        ; Spool File Name: NIL for default [pointer]
  68. iFileVol          EQU         16                        ; Spool File vol [word]
  69. bFileVers         EQU         18                        ; Spool File version [byte]
  70. iPrJobSize        EQU         20                        ; The PrJob size.[20]
  71.  
  72.  
  73. ; The universal 120 byte printing record
  74.  
  75. iPrVersion        EQU         0                         ; Printing software version
  76. prInfo            EQU         2                         ; the PrInfo data associated with the current style.
  77. rPaper            EQU         16                        ; The paper rectangle [offset from rPage].
  78. prStl             EQU         24                        ; This print request's style.
  79. prInfoPT          EQU         32                        ; Print Time Imaging metrics
  80. prXInfo           EQU         46                        ; Print-time (expanded) Print info record.
  81. prJob             EQU         62                        ; The Print Job request
  82. iPrintSize        EQU         120                       ; The Print record size.[120]
  83.  
  84. ; Print Port structure
  85. ; A graf port, its procs, plus some extra.
  86.  
  87. gPort             EQU         0                         ; The Printer's graf port
  88. iPrPortSize       EQU         178                       ; The PrPort size.[178]
  89.  
  90.  
  91. ; Print Status data structure
  92.  
  93. iTotPages         EQU         0                         ; Total pages in Print File [word]
  94. iCurPage          EQU         2                         ; Current page number [word]
  95. iTotCopies        EQU         4                         ; Total copies requested [word]
  96. iCurCopy          EQU         6                         ; Current copy number [word]
  97. iTotBands         EQU         8                         ; Total bands per page [word]
  98. iCurBand          EQU         10                        ; Current band number [word]
  99. fPgDirty          EQU         12                        ; current page has been written to? [byte]
  100. fImaging          EQU         13                        ; in band's DrawPic call? [byte]
  101. hPrint            EQU         14                        ; active Printer record [handle]
  102. pPrPort           EQU         18                        ; active PrPort [pointer]
  103. iPrStatSize       EQU         26                        ; The PrStatus size[26 bytes]
  104.  
  105.  
  106. ; Less common print code stuff
  107.  
  108. wDev              EQU         0                         ; the drvr #, hi byte = refnum, lo byte = variant [word]
  109.  
  110.  
  111. ; These are the definitions for the Print code
  112.  
  113. iPrAbort          EQU         128                       ; Abort
  114. iPrRelease        EQU         3                         ; Current version number of the code.
  115. iPrPgFract        EQU         120                       ; Paper sizes are in 120ths of an inch
  116.  
  117. ; ! ! ! W A R N I N G ! ! !
  118. ; The following PrintErr parameter location should not be accessed directly.
  119. ; To get or set printer errors call the procedures PrError and PrSetError
  120. ; This will insure compatibility with future Print code releases.
  121. ; This parameter is furnished here simply for backward compatibility.
  122. ;PrintErr EQU $944 ; print error global location
  123.  
  124.  
  125. ; Printing Methods -- The DocLoop types
  126.  
  127. bDraftLoop        EQU         0                         ; draft printing
  128. bSpoolLoop        EQU         1                         ; spooled printing
  129. bUser1Loop        EQU         2
  130. bUser2Loop        EQU         3
  131.  
  132. ; Various Resource Types & ID's
  133.  
  134. lPStrType         EQU         $53545220                 ; "STR ": Res type for the Pr Rsrc file name
  135. iPStrRFil         EQU         $E000                     ; Str -8192 is in SysRes & names the current printer
  136. lPrintType        EQU         $50524543                 ; "PREC": Res type for the hPrint records
  137. iPrintDef         EQU         0                         ; Default hPrint
  138. iPrintLst         EQU         1                         ; Last used hPrint
  139. iPrintDrvr        EQU         2                         ; .Print's parameter record; not a Print rec
  140. lPfType           EQU         $5046494C                 ; "PFIL"
  141. lPfSig            EQU         $50535953                 ; "PSYS"
  142. iPfIcon           EQU         140                       ;
  143. lPrType           EQU         $4150504C                 ; "APPL"
  144. lPrSig            EQU         $50535953                 ; "PSYS"
  145. iPrIcon           EQU         138                       ;
  146.  
  147.     ENDIF    ; ...already included